using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using QuanLyThietBi.Config;     
using QuanLyThietBi.Entity;
namespace QuanLyThietBi.ManagerBase
{
                

     public abstract class TBL_PhieuNhapManagerBase
    {
        public TBL_PhieuNhapManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity Insert(TBL_PhieuNhapEntity obj)
        { 
            return (TBL_PhieuNhapEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity Update(TBL_PhieuNhapEntity obj)
        { 
            return (TBL_PhieuNhapEntity)Adapter.Update(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo dieu kien trong object
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity UpdateWithCondition(TBL_PhieuNhapEntity obj,TBL_PhieuNhapEntity objCond)
        { 
            return (TBL_PhieuNhapEntity)Adapter.UpdateWithCondition(obj,objCond);             
        }
 
 
        public TBL_PhieuNhapEntity Delete(TBL_PhieuNhapEntity obj)
        { 
            return (TBL_PhieuNhapEntity)Adapter.Delete(obj);             
        }
 
 
        public TBL_PhieuNhapEntity DeleteWithCondition(TBL_PhieuNhapEntity objCond)
        { 
            return (TBL_PhieuNhapEntity)Adapter.DeleteWithCondition(objCond);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity DeleteByGhiChu (TBL_PhieuNhapEntity obj)
        { 
            return (TBL_PhieuNhapEntity)Adapter.DeleteByField(obj,"GhiChu");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien GhiChu 
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity DeleteByGhiChu (string GhiChu )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.GhiChu = GhiChu;  
            return (TBL_PhieuNhapEntity)Adapter.DeleteByField(obj,"GhiChu");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaHSo duoc set trong object
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity DeleteByMaHSo (TBL_PhieuNhapEntity obj)
        { 
            return (TBL_PhieuNhapEntity)Adapter.DeleteByField(obj,"MaHSo");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaHSo 
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity DeleteByMaHSo (string MaHSo )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaHSo = MaHSo;  
            return (TBL_PhieuNhapEntity)Adapter.DeleteByField(obj,"MaHSo");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaNCC duoc set trong object
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity DeleteByMaNCC (TBL_PhieuNhapEntity obj)
        { 
            return (TBL_PhieuNhapEntity)Adapter.DeleteByField(obj,"MaNCC");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaNCC 
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity DeleteByMaNCC (string MaNCC )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaNCC = MaNCC;  
            return (TBL_PhieuNhapEntity)Adapter.DeleteByField(obj,"MaNCC");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaPN duoc set trong object
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity DeleteByMaPN (TBL_PhieuNhapEntity obj)
        { 
            return (TBL_PhieuNhapEntity)Adapter.DeleteByField(obj,"MaPN");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaPN 
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity DeleteByMaPN (Guid MaPN )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaPN = MaPN;  
            return (TBL_PhieuNhapEntity)Adapter.DeleteByField(obj,"MaPN");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien NgayNhap duoc set trong object
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity DeleteByNgayNhap (TBL_PhieuNhapEntity obj)
        { 
            return (TBL_PhieuNhapEntity)Adapter.DeleteByField(obj,"NgayNhap");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien NgayNhap 
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity DeleteByNgayNhap (string NgayNhap )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NgayNhap = NgayNhap;  
            return (TBL_PhieuNhapEntity)Adapter.DeleteByField(obj,"NgayNhap");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien NguoiNhap duoc set trong object
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity DeleteByNguoiNhap (TBL_PhieuNhapEntity obj)
        { 
            return (TBL_PhieuNhapEntity)Adapter.DeleteByField(obj,"NguoiNhap");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien NguoiNhap 
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity DeleteByNguoiNhap (string NguoiNhap )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NguoiNhap = NguoiNhap;  
            return (TBL_PhieuNhapEntity)Adapter.DeleteByField(obj,"NguoiNhap");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien NoiDung duoc set trong object
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity DeleteByNoiDung (TBL_PhieuNhapEntity obj)
        { 
            return (TBL_PhieuNhapEntity)Adapter.DeleteByField(obj,"NoiDung");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien NoiDung 
        /// </summary>
        /// <returns>TBL_PhieuNhapEntity</returns>
        public TBL_PhieuNhapEntity DeleteByNoiDung (string NoiDung )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NoiDung = NoiDung;  
            return (TBL_PhieuNhapEntity)Adapter.DeleteByField(obj,"NoiDung");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public TBL_PhieuNhapEntity Select(TBL_PhieuNhapEntity obj)
        { 
            return (TBL_PhieuNhapEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(TBL_PhieuNhapEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(TBL_PhieuNhapEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new TBL_PhieuNhapEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new TBL_PhieuNhapEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<TBL_PhieuNhapEntity> SelectAllLST()
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new TBL_PhieuNhapEntity()),new TBL_PhieuNhapEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<TBL_PhieuNhapEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new TBL_PhieuNhapEntity(),option),new TBL_PhieuNhapEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByGhiChu (TBL_PhieuNhapEntity obj)
        { 
            return Adapter.SelectByField(obj,"GhiChu");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByGhiChu (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"GhiChu",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectByGhiChuLST (TBL_PhieuNhapEntity obj)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"GhiChu"),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectByGhiChuLST (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"GhiChu",option),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByGhiChu (string GhiChu )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.GhiChu = GhiChu;  
            return Adapter.SelectByField(obj,"GhiChu");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByGhiChu (string GhiChu, SelectOptions option)
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.GhiChu = GhiChu;  
            return Adapter.SelectByField(obj,"GhiChu",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_PhieuNhapEntity> SelectByGhiChuLST (string GhiChu )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.GhiChu = GhiChu;  
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"GhiChu"),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_PhieuNhapEntity> SelectByGhiChuLST (string GhiChu, SelectOptions option)
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.GhiChu = GhiChu;  
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"GhiChu",option),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaHSo (TBL_PhieuNhapEntity obj)
        { 
            return Adapter.SelectByField(obj,"MaHSo");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaHSo (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MaHSo",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectByMaHSoLST (TBL_PhieuNhapEntity obj)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaHSo"),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectByMaHSoLST (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MaHSo",option),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaHSo (string MaHSo )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaHSo = MaHSo;  
            return Adapter.SelectByField(obj,"MaHSo");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaHSo (string MaHSo, SelectOptions option)
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaHSo = MaHSo;  
            return Adapter.SelectByField(obj,"MaHSo",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_PhieuNhapEntity> SelectByMaHSoLST (string MaHSo )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaHSo = MaHSo;  
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaHSo"),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_PhieuNhapEntity> SelectByMaHSoLST (string MaHSo, SelectOptions option)
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaHSo = MaHSo;  
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaHSo",option),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNCC duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaNCC (TBL_PhieuNhapEntity obj)
        { 
            return Adapter.SelectByField(obj,"MaNCC");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNCC duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaNCC (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MaNCC",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNCC duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectByMaNCCLST (TBL_PhieuNhapEntity obj)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaNCC"),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNCC duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectByMaNCCLST (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MaNCC",option),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNCC 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaNCC (string MaNCC )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaNCC = MaNCC;  
            return Adapter.SelectByField(obj,"MaNCC");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNCC duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaNCC (string MaNCC, SelectOptions option)
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaNCC = MaNCC;  
            return Adapter.SelectByField(obj,"MaNCC",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNCC 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_PhieuNhapEntity> SelectByMaNCCLST (string MaNCC )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaNCC = MaNCC;  
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaNCC"),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNCC duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_PhieuNhapEntity> SelectByMaNCCLST (string MaNCC, SelectOptions option)
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaNCC = MaNCC;  
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaNCC",option),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaPN (TBL_PhieuNhapEntity obj)
        { 
            return Adapter.SelectByField(obj,"MaPN");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaPN (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MaPN",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectByMaPNLST (TBL_PhieuNhapEntity obj)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaPN"),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectByMaPNLST (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MaPN",option),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaPN (Guid MaPN )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaPN = MaPN;  
            return Adapter.SelectByField(obj,"MaPN");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaPN (Guid MaPN, SelectOptions option)
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaPN = MaPN;  
            return Adapter.SelectByField(obj,"MaPN",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_PhieuNhapEntity> SelectByMaPNLST (Guid MaPN )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaPN = MaPN;  
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaPN"),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_PhieuNhapEntity> SelectByMaPNLST (Guid MaPN, SelectOptions option)
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.MaPN = MaPN;  
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaPN",option),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NgayNhap duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNgayNhap (TBL_PhieuNhapEntity obj)
        { 
            return Adapter.SelectByField(obj,"NgayNhap");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NgayNhap duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNgayNhap (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"NgayNhap",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NgayNhap duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectByNgayNhapLST (TBL_PhieuNhapEntity obj)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"NgayNhap"),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NgayNhap duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectByNgayNhapLST (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"NgayNhap",option),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NgayNhap 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNgayNhap (string NgayNhap )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NgayNhap = NgayNhap;  
            return Adapter.SelectByField(obj,"NgayNhap");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NgayNhap duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNgayNhap (string NgayNhap, SelectOptions option)
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NgayNhap = NgayNhap;  
            return Adapter.SelectByField(obj,"NgayNhap",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NgayNhap 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_PhieuNhapEntity> SelectByNgayNhapLST (string NgayNhap )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NgayNhap = NgayNhap;  
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"NgayNhap"),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NgayNhap duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_PhieuNhapEntity> SelectByNgayNhapLST (string NgayNhap, SelectOptions option)
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NgayNhap = NgayNhap;  
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"NgayNhap",option),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NguoiNhap duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNguoiNhap (TBL_PhieuNhapEntity obj)
        { 
            return Adapter.SelectByField(obj,"NguoiNhap");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NguoiNhap duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNguoiNhap (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"NguoiNhap",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NguoiNhap duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectByNguoiNhapLST (TBL_PhieuNhapEntity obj)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"NguoiNhap"),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NguoiNhap duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectByNguoiNhapLST (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"NguoiNhap",option),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NguoiNhap 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNguoiNhap (string NguoiNhap )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NguoiNhap = NguoiNhap;  
            return Adapter.SelectByField(obj,"NguoiNhap");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NguoiNhap duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNguoiNhap (string NguoiNhap, SelectOptions option)
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NguoiNhap = NguoiNhap;  
            return Adapter.SelectByField(obj,"NguoiNhap",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NguoiNhap 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_PhieuNhapEntity> SelectByNguoiNhapLST (string NguoiNhap )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NguoiNhap = NguoiNhap;  
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"NguoiNhap"),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NguoiNhap duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_PhieuNhapEntity> SelectByNguoiNhapLST (string NguoiNhap, SelectOptions option)
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NguoiNhap = NguoiNhap;  
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"NguoiNhap",option),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDung duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNoiDung (TBL_PhieuNhapEntity obj)
        { 
            return Adapter.SelectByField(obj,"NoiDung");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDung duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNoiDung (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"NoiDung",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDung duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectByNoiDungLST (TBL_PhieuNhapEntity obj)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"NoiDung"),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDung duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectByNoiDungLST (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"NoiDung",option),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDung 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNoiDung (string NoiDung )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NoiDung = NoiDung;  
            return Adapter.SelectByField(obj,"NoiDung");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDung duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNoiDung (string NoiDung, SelectOptions option)
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NoiDung = NoiDung;  
            return Adapter.SelectByField(obj,"NoiDung",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDung 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_PhieuNhapEntity> SelectByNoiDungLST (string NoiDung )
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NoiDung = NoiDung;  
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"NoiDung"),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDung duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_PhieuNhapEntity> SelectByNoiDungLST (string NoiDung, SelectOptions option)
        { 
            TBL_PhieuNhapEntity obj = new TBL_PhieuNhapEntity();
            obj.NoiDung = NoiDung;  
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"NoiDung",option),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectWithConditionLST (TBL_PhieuNhapEntity obj)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new TBL_PhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<TBL_PhieuNhapEntity></returns>
        public List<TBL_PhieuNhapEntity> SelectWithConditionLST (TBL_PhieuNhapEntity obj,SelectOptions option)
        { 
            return  (List<TBL_PhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new TBL_PhieuNhapEntity());
        }

}
}
